package EmployeeSalaryManagementSystem;

/**
 * 员工基类
 */
public abstract class Employee {
    protected String name;
    protected String id;

    public Employee(String name, String id) {
        this.name = name;
        this.id = id;
    }

    // 抽象方法，子类必须实现
    public abstract double calculateSalary();

    // 生成工资条信息
    public abstract String generatePaySlip();

    // Getters and Setters
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Employee{name='" + name + "', id='" + id + "'}";
    }
}
